package com.example.demo.mapper;

import com.example.demo.entity.Genealogy;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GenealogyMapper {
    List<Genealogy> selectAll();

    @Select("select * from `genealogy` where genealogy_id = #{genealogyId}")
    Genealogy selectById(Long genealogyId);

    void insert(Genealogy genealogy);

    void updateById(Genealogy genealogy);

    @Delete("delete from `genealogy` where genealogy_id = #{genealogyId}")
    void deleteById(Long genealogyId);
}